package cqut.gbq.qimo.mapper;

import cqut.gbq.qimo.entity.Assignment;
import cqut.gbq.qimo.entity.Student;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author leo
 * @create 2021-06-211:10
 */
@Repository
public interface AssignmentMapper {
    List<Assignment> findAssignmentsByCid(Integer cid);

    Integer findAid(Assignment assignment);

//    Integer createAssignment(String assignmentDesc, String startTime, String assignmentEnd, String assignmentName, Integer fullScore, Integer cid);
    Integer createAssignment(Assignment assignment);

    List<Student> getAssignmentDetail(Integer aid);

    Assignment getAssigmentByAid(Integer aid);

    Integer editScore(Integer sid, Integer aid, Integer score);

    void deleteAssignmentByCid(Integer cid);

    void deleteAssignmentAndStudentByAid(Integer aid);

    Integer deleteAssignmentByAid(Integer aid);

    Integer editAssignment(Assignment assignment);
}
